package com.liaoyoule.multiple.service.impl;

import com.liaoyoule.multiple.dao.entity.UserEntity;
import com.liaoyoule.multiple.dao.repository.UserRepository;
import com.liaoyoule.multiple.dto.UserDTO;
import com.liaoyoule.multiple.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.List;

/**
 * Created by 40864 on 2017/2/19.
 */
@Service
public class UserServiceImpl extends BaseServiceImpl<UserEntity,UserDTO> implements UserService {
    @Autowired
    private UserRepository userRepository;
    @Override
    protected Class getJpaRepositoryClazz() {
        return UserRepository.class;
    }
    @Transactional
    public List<UserEntity> listUser(){
        List<UserEntity> all = userRepository.findAll();
        return all;
    }

}
